package rsb21411ls.d1109;

public class Student {
    private static String name;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Student(String name) {
        this.name = name;
    }

    public Student(){

    }
    public static int add(int[] arr){
        int sum=0;
        for (int x=0;x<arr.length;x++){
            sum+=arr[x];
        }return sum;
    }
    public static void play(Ball ball){
        System.out.println(name+"在玩"+ball.getBrandName()+",这个球的价格是"+ball.getPrice());
    }//喂养小动物
    public void feed(Animal ani){
        System.out.println(this.name+"在喂"+ani.getName());
        ani.shout();
    }/*
    public void feed(Cat cat){

    }
    public void feed(Dog dog){}*/
}

